<template>
  <el-drawer
    v-model="drawerVisible"
    :size="650"
    :title="title"
    @closed="$emit('closed')"
    append-to-body
  >
    <el-container v-loading="saveLoading">
      <el-main>
        <el-form :model="form" ref="saveForm" label-width="140px">
          <el-card class="elCard" style="margin-bottom: 10px">
            <el-form-item label="企业名称" prop="name">
              {{ form.name }}
            </el-form-item>

            <el-form-item
              label="统一社会信用代码"
              prop="unifiedCode"
            >
              {{ form.unifiedCode }}
            </el-form-item>

            <el-form-item label="企业属地" prop="block">
              {{ form.block }}
            </el-form-item>
            <el-form-item label="注册地址" prop="address">
              {{ form.address }}
            </el-form-item>
            <el-form-item label="注册日期" prop="regDate">
            {{ form.regDate }}
          </el-form-item>
            <el-form-item label="联系电话" prop="contactNumber">
              {{ form.contactNumber }}
            </el-form-item>
            <el-form-item label="缴纳社保信息" prop="insrcInfo">
              {{ form.insrcInfo }}
            </el-form-item>
            <el-form-item label="缴纳人数" prop="personCount">
              {{ form.personCount }}
            </el-form-item>
          </el-card>

          <el-row>
            <el-col :span="12">
              <el-form-item label="摸查情况" prop="status">
                {{ form.status }}
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="是否重点企业" prop="keyEnterprises">
                {{ form.keyEnterprises }}
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="12">
              <el-form-item label="用工情况" prop="employmentStatus">
                {{ form.employmentStatus }}
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="用工人数" prop="employeeCount">
                {{ form.employeeCount }}
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="12">
              <el-form-item label="用工计划" prop="employmentPlay">
                {{ form.employmentPlay }}
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="经营情况" prop="opStatus">
                {{ form.opStatus }}
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="12">
              <el-form-item label="联系人" prop="contact">
                {{ form.contact }}
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="联系人电话" prop="contactPhone">
                {{ form.contactPhone }}
              </el-form-item>
            </el-col>
          </el-row>

          <el-form-item label="企业办公地址" prop="officeAddress">
            {{ form.officeAddress }}
          </el-form-item>

          <el-form-item label="企业清单分类" prop="listClassification">
            {{ form.listClassification }}
          </el-form-item>

          <div class="subTitle">
            <span>服务需求</span>
          </div>
          <el-row>
            <el-col :span="5">
              <el-form-item label="用工指导" prop="employmentGuidance">
                {{ form.employmentGuidance }}
              </el-form-item>
            </el-col>
            <el-col :span="5">
              <el-form-item label="技能培训" prop="skillsTraining	">
                {{ form.skillsTraining }}
              </el-form-item>
            </el-col>
            <el-col :span="5">
              <el-form-item label="政策支持" prop="policySupport">
                {{ form.policySupport }}
              </el-form-item>
            </el-col>
            <el-col :span="5">
              <el-form-item label="其他" prop="other">
                {{ form.other }}
              </el-form-item>
            </el-col>
          </el-row>
          <!-- ---------------- -->

          
         
          
        </el-form>
      </el-main>
      <el-footer>
        <div class="form-footer">
          <el-button type="primary" @click="close">关闭</el-button>
        </div>
      </el-footer>
    </el-container>
  </el-drawer>
</template>

<script>
export default {
  name: "enterpriseList-details",
  data() {
    return {
      saveLoading: false,
      drawerVisible: false,
      title: "企业清单信息",
      form: {
        enterprise: {},
      },
    };
  },
  watch: {},
  mounted() {},
  methods: {
    //获取详细数据
    async open(id) {
      this.drawerVisible = true;
      this.saveLoading = true;
      let params = { id: id };
      let res = await this.$API.enterpriseList.details.get(params);
      if (res.code == 0) {
        this.form = res.data;
        this.saveLoading = false;
      } else {
        let errdata = this.$TOOL.response(res);
        this.$alert(
          this.$TOOL.json.get("", errdata, "message"),
          this.$TOOL.json.get("", errdata, "title"),
          {
            type: "error",
            confirmButtonText: "确定",
            dangerouslyUseHTMLString: true,
            showCancelButton: false,
          }
        )
          .then(() => {
            this.drawerVisible = false;
          })
          .catch(() => {});
      }
    },
    // 关闭页面
    close() {
      this.drawerVisible = false;
    },
  },
};
</script>

<style scoped>
.elCard:deep(.el-card__body) {
  padding-top: 15px;
  padding-bottom: 0px;
}
</style>
